using Wolfpack.Core;
using Wolfpack.Core.Configuration;
using Wolfpack.Core.Interfaces.Entities;
using Wolfpack.Core.Notification.Filters.Request;

namespace Wolfpack.Contrib.BuildAnalytics.Tfs.Checks
{
    public class TfsBuildNotificationConfigurationDiscovery : HealthCheckDiscoveryBase<TfsBuildNotificationCheckConfig, TfsBuildNotificationCheck>
    {
        protected override TfsBuildNotificationCheckConfig GetConfiguration()
        {
            return new TfsBuildNotificationCheckConfig
                       {
                           ServerUrl = "CHANGEME!",
                           TeamProjectName = "CHANGEME!",
                           Enabled = true,
                           FriendlyId = "CHANGEME!",
                           NotificationMode = AlwaysPublishNotificationFilter.FilterName,
                       };
        }

        protected override void Configure(ConfigurationEntry entry)
        {
            entry.Name = "TfsBuildNotificationCheck";
            entry.Description = "This check will monitor a TFS Project for new builds and raises notifications based on the build status";
            entry.Tags.AddIfMissing("TFS", "CI");
        }
    }
}